package com.peas.platform.module.icims.budget.archives.api;

import com.peas.platform.common.core.dto.ResponseDto;
import com.peas.platform.module.icims.budget.archives.api.req.SaveBudgetItemTypeRange;
import com.peas.platform.module.icims.budget.archives.service.BudgetItemTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@Api(tags = "自定义接口-[预算控制]明细项目类别")
@RestController
@RequestMapping("/api/v1/customBudgetItemType")
public class CustomItemTypeApiController {

    @Resource
    private BudgetItemTypeService budgetItemTypeService;

    @ApiOperation(value = "添加明细项目类别")
    @PostMapping("/saveBudgetItemTypeRange")
    public ResponseDto<Boolean> saveBudgetItemTypeRange(@RequestBody @Valid SaveBudgetItemTypeRange vo) {
        budgetItemTypeService.saveBudgetItemTypeRange(vo);
        return ResponseDto.getSuccessResponseDto(true);
    }

}
